package com.lizicloud.user.userLogin.constants;

/**
 * 登录模块常量类
 * 
 * @author lizicloud
 * @version 1.0
 * @since 2024-01-01
 */
public class LoginConstants {
    
    /**
     * JWT令牌相关常量
     */
    public static final String TOKEN_PREFIX = "Bearer ";
    public static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String TOKEN_TYPE = "Bearer";
    
    /**
     * 用户状态常量
     */
    public static final Integer USER_STATUS_ENABLED = 1;
    public static final Integer USER_STATUS_DISABLED = 0;
    
    /**
     * 用户角色常量
     */
    public static final String ROLE_ADMIN = "ADMIN";
    public static final String ROLE_USER = "USER";
    
    /**
     * 登录相关常量
     */
    public static final String LOGIN_SUCCESS_MESSAGE = "登录成功";
    public static final String LOGIN_FAILED_MESSAGE = "登录失败，用户名或密码错误";
    public static final String INVALID_CREDENTIALS_MESSAGE = "用户名或密码错误";
    public static final String USER_DISABLED_MESSAGE = "用户已被禁用，请联系管理员";
    public static final String USER_NOT_FOUND_MESSAGE = "用户不存在";
    public static final String INVALID_TOKEN_MESSAGE = "无效的认证令牌";
    public static final String LOGOUT_SUCCESS_MESSAGE = "退出登录成功";
    public static final String LOGIN_FAILURE_MESSAGE = "登录失败，请稍后重试";
    public static final String GET_USER_INFO_FAILURE_MESSAGE = "获取用户信息失败";
    
    /**
     * 请求相关常量
     */
    public static final String UNKNOWN_IP = "unknown";
    public static final String LOCALHOST_IP = "127.0.0.1";
    public static final String LOCALHOST_IP_6 = "0:0:0:0:0:0:0:1";
    
    /**
     * 日志相关常量
     */
    public static final String LOGIN_SUCCESS_LOG = "用户登录成功：用户账号={}";
    public static final String LOGIN_FAILURE_LOG = "用户登录失败：用户账号={}, 错误={}";
    public static final String GET_USER_INFO_FAILURE_LOG = "获取用户信息失败：用户账号={}, 错误={}";
    
    private LoginConstants() {
        // 私有构造函数，防止实例化
    }
}